{extend name="top/index" /}
{block name="main"}
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
	<div class="page-content" style="min-height: 876px !important;">
		<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
		<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
						<h4 class="modal-title">Modal title</h4>
					</div>
					<div class="modal-body">
						Widget settings form goes here
					</div>
					<div class="modal-footer">
						<button type="button" class="btn blue">Save changes</button>
						<button type="button" class="btn default" data-dismiss="modal">Close</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>
		<!-- /.modal -->
		<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
		<!-- BEGIN STYLE CUSTOMIZER -->
		<div class="theme-panel hidden-xs hidden-sm">
			<!-- <div class="toggler">
            </div> -->
			<div class="toggler-close">
			</div>
			<div class="theme-options">
				<div class="theme-option theme-colors clearfix">
						<span>
							 THEME COLOR
						</span>
					<ul>
						<li class="color-black current color-default" data-style="default">
						</li>
						<li class="color-blue" data-style="blue">
						</li>
						<li class="color-brown" data-style="brown">
						</li>
						<li class="color-purple" data-style="purple">
						</li>
						<li class="color-grey" data-style="grey">
						</li>
						<li class="color-white color-light" data-style="light">
						</li>
					</ul>
				</div>
				<div class="theme-option">
						<span>
							 Layout
						</span>
					<select class="layout-option form-control input-small">
						<option value="fluid" selected="selected">Fluid</option>
						<option value="boxed">Boxed</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Header
						</span>
					<select class="header-option form-control input-small">
						<option value="fixed" selected="selected">Fixed</option>
						<option value="default">Default</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Sidebar
						</span>
					<select class="sidebar-option form-control input-small">
						<option value="fixed">Fixed</option>
						<option value="default" selected="selected">Default</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Sidebar Position
						</span>
					<select class="sidebar-pos-option form-control input-small">
						<option value="left" selected="selected">Left</option>
						<option value="right">Right</option>
					</select>
				</div>
				<div class="theme-option">
						<span>
							 Footer
						</span>
					<select class="footer-option form-control input-small">
						<option value="fixed">Fixed</option>
						<option value="default" selected="selected">Default</option>
					</select>
				</div>
			</div>
		</div>
		<!-- END STYLE CUSTOMIZER -->
		<!-- BEGIN PAGE HEADER-->
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN PAGE TITLE & BREADCRUMB-->
				<h3 class="page-title">
					库房管理
				</h3>
				<ul class="page-breadcrumb breadcrumb">
					<li>
						<i class="fa fa-home"></i>
						<a href="{:url('index/index/index')}">
							Home
						</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="{:url('index/Storage/index')}">
							库房管理
						</a>
						<i class="fa fa-angle-right"></i>
					</li>
					{$nav_html}
				</ul>
				<!-- END PAGE TITLE & BREADCRUMB-->
			</div>
		</div>

		<!-- END PAGE HEADER-->
		<!-- BEGIN PAGE CONTENT-->
		<div class="row">
			<div class="col-md-12">
				<!-- Begin: life time stats -->
				<div class="portlet">
					<div class="portlet-title">
						{switch name="type"}
						{case value="1"}
						<div class="caption">
							<i class="fa fa-gift"></i>
							全部库存
						</div>
						<div>
							<!--<span class="glyphicon glyphicon-edit" style="font-size: 15px;cursor: pointer;margin-left: 10px;"></span>-->
						</div>
						{/case}
						{case value="2"}
						<div class="caption">
							<i class="fa fa-gift"></i>
							库房：{$fdata.sto_name}（{$fdata.sto_no}）
						</div>
						<div>
							<a class="glyphicon glyphicon-edit getmodal" href="{:url('index/Storage/editStorage')}?pid={$pid}" style="font-size: 15px;cursor: pointer;margin-left: 10px;"></a>
						</div>
						{/case}
						{case value="3"}
						<div class="caption">
							<i class="fa fa-gift"></i>
							档案柜：{$fdata.sto_name} （{$fdata.sto_layers} x {$fdata.sto_width}mm）
						</div>
						<div>
							<a class="glyphicon glyphicon-edit getmodal" href="{:url('index/Storage/editStorage2')}?pid={$pid}" style="font-size: 15px;cursor: pointer;margin-left: 10px;"></a>
						</div>
						{/case}
						{/switch}
						<div class="actions">
							<div class="btn-group">
								{switch name="type"}
								{case value="1"}
								<a class="btn blue yellow-stripe getmodal" href="{:url('index/Storage/addStorage')}" data-toggle="dropdown">
									<i class="glyphicon glyphicon-plus"></i> 库房
								</a>
								{/case}
								{case value="2"}
								<a class="btn blue yellow-stripe getmodal" href="{:url('index/Storage/addStorage2')}?pid={$pid}" data-toggle="dropdown">
									<i class="glyphicon glyphicon-plus"></i> 档案柜
								</a>
								{/case}
								{case value="3"}
								<!--<a class="btn blue yellow-stripe getmodal" href="{:url('index/Storage/addStorage3')}?pid={$pid}" data-toggle="dropdown">
									<i class="glyphicon glyphicon-plus"></i> 档案盒
								</a>-->
								{/case}
								{/switch}
							</div>
						</div>
					</div>
					<div class="portlet-body">
						<div class="table-container">
							<div class="table-actions-wrapper">
									<span>
									</span>
								<select class="table-group-action-input form-control input-inline input-small input-sm">
									<option value="">Select...</option>
									<option value="publish">Publish</option>
									<option value="unpublished">Un-publish</option>
									<option value="delete">Delete</option>
								</select>
								<button class="btn btn-sm yellow table-group-action-submit"><i class="fa fa-check"></i> Submit</button>
							</div>
						</div>
					</div>
					<!-- End: life time stats -->
				</div>
				{switch name="type"}
				{case value="1"}
				{foreach $data as $d}
				<div style="width: 100px;text-align: center;float: left">
					<a href="{:url('index/Storage/index')}?type=2&id={$d.sto_id}">
						<i class="glyphicon glyphicon-tasks" style="font-size:70px;"></i>
						<br>
						<span>{$d.sto_name}</span>
					</a>
				</div>
				{/foreach}
				{/case}
				{case value="2"}
				{foreach $data as $d}
				<div style="width: 100px;text-align: center;float: left">
					<a href="{:url('index/Storage/index')}?type=3&id={$d.sto_id}">
						<i class="glyphicon glyphicon-inbox" style="font-size:70px;"></i>
						<br>
						<span>{$d.sto_name}</span>
					</a>
				</div>
				{/foreach}
				{/case}
				{case value="3"}
				{for start="0" end="$fdata['sto_layers']" step="1" name="i"}
				<div class="well well-lg" style="">
					<div style="text-align: right">
						<a class="btn blue yellow-stripe getmodal" href="{:url('index/Storage/addStorage3')}?pid={$pid}&layers={$i}" data-toggle="dropdown">
							<i class="glyphicon glyphicon-plus"></i>
						</a>
					</div>
					<div style="height: 100px;">
						{foreach name="data[$i]['data']" item="dd"}
						<a class="btn btn-info getmodal" href="{:url('index/Storage/editStorage3')}?pid={$dd.sto_id}&layers={$i}" style="height: 100%;width:{$dd.bfb}%;float: left;border: 1px solid" title="盒号【{$dd.sto_name}】厚度【{$dd.sto_thickness}】页数【{$dd.sto_available_pages}】">
							盒号：{$dd.sto_name}<br/>
							厚度：{$dd.sto_thickness}<br/>
							页数：{$dd.sto_available_pages}
						</a>
						{/foreach}
					</div>

				</div>
				{/for}
				{/case}
				{/switch}
			</div>

			<!-- END PAGE CONTENT-->
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="footer">
	<div class="footer-inner">
		2018 &copy; 仁聚科技
	</div>
	<div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
	</div>
</div>
<script src="/static/assets/plugins/respond.min.js"></script>
<script src="/static/assets/plugins/excanvas.min.js"></script>
<script src="/static/assets/scripts/core/dt.js"></script>
<script>
    dt().getModals();
</script>
<script>
		$(function(){
			$('.storage').addClass("active");
		});
</script>
</body>
</html>
{/block}
